<?php
class ServiceOrderRow extends AppModel {
	var $belongsTo = array('CubiertaMarca'=>array('className'=>'CubiertaMarca'),
													'Article'=>array('className'=>'Article'));
	//var $belongsTo = array('ServiceOrder'=>array('className'=>'ServiceOrder'));
	var $hasMany =  array('ServiceOrderRowState' =>
			array(
					'finderQuery' => 'SELECT * 
					FROM service_order_row_states AS ServiceOrderRowState 
					JOIN states ON states.id = ServiceOrderRowState.state_id 
					WHERE ServiceOrderRowState.service_order_row_id  IN ({$__cakeID__$}) 
					ORDER BY ServiceOrderRowState.id DESC'
					)
			);	
}
